package com.tang.visitor.impl;

import com.tang.user.impl.Student;
import com.tang.user.impl.Teacher;
import com.tang.visitor.IVisitorService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 访问者：家长
 */
public class ParentServiceImpl implements IVisitorService {

    private final Logger log = LoggerFactory.getLogger(this.getClass());

    @Override
    public void visit(Student student) {
        log.info("学生信息 姓名：{}， 班级：{}， 排名：{}", student.name, student.clazz, student.ranking());
    }

    @Override
    public void visit(Teacher teacher) {
        log.info("学生信息 姓名：{}，班级：{}", teacher.name, teacher.clazz);
    }
}
